Many implantable medical devices (IMD's), for example, including pacemakers, cardioverter-defibrillators and neural stimulators, are operatively coupled to electrodes, which are joined to elongate lead wires that extend from the devices to a target site either on or within a body of a patient. The electrodes sense electrical signals from the patient, for example cardiac depolarization signals, which are used to diagnose the patient and, in many cases, may be used to guide or dictate therapy delivery. Having such an IMD may be a contraindication for MRI, due, at least in part, to the lead wires acting as antennae, which pick up radio-frequency (RF) energy transmitted during MRI; the RF energy can cause heating of the electrodes, which are coupled to the lead wires, and may introduce sensing artifact, causing erroneous cardiac event detection that can compromise therapy delivery during MRI. Thus, there is a need to detect if a patient has an IMD before allowing the patient to undergo MRI.